.class Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;
.super Ljava/lang/Thread;
.source "FeedBackActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/netease/newsreader/activity/FeedBackActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "postEditMessage"
.end annotation


# instance fields
.field final a:Ljava/lang/String;

.field final synthetic this$0:Lcom/netease/newsreader/activity/FeedBackActivity;


# direct methods
.method constructor <init>(Lcom/netease/newsreader/activity/FeedBackActivity;)V
    .locals 1
    .parameter

    .prologue
    .line 225
    iput-object p1, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    .line 226
    invoke-static {p1}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$5(Lcom/netease/newsreader/activity/FeedBackActivity;)Landroid/widget/EditText;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-interface {v0}, Landroid/text/Editable;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->a:Ljava/lang/String;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 14

    .prologue
    const/16 v8, 0x23

    const/16 v7, 0xa

    const/4 v13, 0x1

    const/4 v12, 0x0

    .line 230
    new-instance v3, Landroid/os/Message;

    invoke-direct {v3}, Landroid/os/Message;-><init>()V

    .line 231
    .local v3, msg:Landroid/os/Message;
    iput v13, v3, Landroid/os/Message;->what:I

    .line 232
    new-instance v9, Ljava/lang/StringBuilder;

    iget-object v10, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v10}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$8(Lcom/netease/newsreader/activity/FeedBackActivity;)Ljava/lang/String;

    move-result-object v10

    invoke-static {v10}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v10

    invoke-direct {v9, v10}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v10, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v10}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$6(Lcom/netease/newsreader/activity/FeedBackActivity;)Ljava/lang/String;

    move-result-object v10

    iget-object v11, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v11}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$6(Lcom/netease/newsreader/activity/FeedBackActivity;)Ljava/lang/String;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/String;->length()I

    move-result v11

    if-le v11, v7, :cond_2

    :goto_0
    invoke-virtual {v10, v12, v7}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v9, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    .line 233
    .local v6, title:Ljava/lang/String;
    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v7

    if-le v7, v8, :cond_3

    move v7, v8

    :goto_1
    invoke-virtual {v6, v12, v7}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v6

    .line 235
    :try_start_0
    new-instance v1, Lorg/apache/http/client/methods/HttpPost;

    const-string v7, "http://3g.163.com/bbs/bbs_news/3g/feedback.do"

    invoke-direct {v1, v7}, Lorg/apache/http/client/methods/HttpPost;-><init>(Ljava/lang/String;)V

    .line 237
    .local v1, httpRequest:Lorg/apache/http/client/methods/HttpPost;
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 238
    .local v4, params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    new-instance v7, Lorg/apache/http/message/BasicNameValuePair;

    const-string v8, "boardid"

    const-string v9, "newsfeedback"

    invoke-direct {v7, v8, v9}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v4, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 239
    new-instance v7, Lorg/apache/http/message/BasicNameValuePair;

    const-string v8, "title"

    invoke-direct {v7, v8, v6}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v4, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 240
    new-instance v7, Lorg/apache/http/message/BasicNameValuePair;

    const-string v8, "comment"

    iget-object v9, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v9}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$6(Lcom/netease/newsreader/activity/FeedBackActivity;)Ljava/lang/String;

    move-result-object v9

    invoke-direct {v7, v8, v9}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v4, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 241
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->a:Ljava/lang/String;

    if-eqz v7, :cond_0

    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->a:Ljava/lang/String;

    const-string v8, ""

    invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_0

    .line 243
    new-instance v7, Lorg/apache/http/message/BasicNameValuePair;

    const-string v8, "email"

    iget-object v9, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->a:Ljava/lang/String;

    invoke-direct {v7, v8, v9}, Lorg/apache/http/message/BasicNameValuePair;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-interface {v4, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 245
    :cond_0
    new-instance v7, Lorg/apache/http/client/entity/UrlEncodedFormEntity;

    const-string v8, "UTF-8"

    invoke-direct {v7, v4, v8}, Lorg/apache/http/client/entity/UrlEncodedFormEntity;-><init>(Ljava/util/List;Ljava/lang/String;)V

    invoke-virtual {v1, v7}, Lorg/apache/http/client/methods/HttpPost;->setEntity(Lorg/apache/http/HttpEntity;)V

    .line 246
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    new-instance v8, Lorg/apache/http/impl/client/DefaultHttpClient;

    invoke-direct {v8}, Lorg/apache/http/impl/client/DefaultHttpClient;-><init>()V

    invoke-static {v7, v8}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$9(Lcom/netease/newsreader/activity/FeedBackActivity;Lorg/apache/http/impl/client/DefaultHttpClient;)V

    .line 247
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v7}, Lcom/netease/newsreader/util/Tools;->isCMWAPMobileNet(Landroid/content/Context;)Z

    move-result v7

    if-eqz v7, :cond_1

    .line 248
    new-instance v5, Lorg/apache/http/HttpHost;

    const-string v7, "10.0.0.172"

    const/16 v8, 0x50

    const-string v9, "http"

    invoke-direct {v5, v7, v8, v9}, Lorg/apache/http/HttpHost;-><init>(Ljava/lang/String;ILjava/lang/String;)V

    .line 249
    .local v5, proxy:Lorg/apache/http/HttpHost;
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$10(Lcom/netease/newsreader/activity/FeedBackActivity;)Lorg/apache/http/impl/client/DefaultHttpClient;

    move-result-object v7

    invoke-virtual {v7}, Lorg/apache/http/impl/client/DefaultHttpClient;->getParams()Lorg/apache/http/params/HttpParams;

    move-result-object v7

    const-string v8, "http.route.default-proxy"

    invoke-interface {v7, v8, v5}, Lorg/apache/http/params/HttpParams;->setParameter(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams;

    .line 251
    .end local v5           #proxy:Lorg/apache/http/HttpHost;
    :cond_1
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$10(Lcom/netease/newsreader/activity/FeedBackActivity;)Lorg/apache/http/impl/client/DefaultHttpClient;

    move-result-object v7

    invoke-virtual {v7, v1}, Lorg/apache/http/impl/client/DefaultHttpClient;->execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/HttpResponse;

    move-result-object v2

    .line 253
    .local v2, httpResponse:Lorg/apache/http/HttpResponse;
    const/4 v7, 0x0

    iput v7, v3, Landroid/os/Message;->arg1:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 259
    .end local v1           #httpRequest:Lorg/apache/http/client/methods/HttpPost;
    .end local v2           #httpResponse:Lorg/apache/http/HttpResponse;
    .end local v4           #params:Ljava/util/List;,"Ljava/util/List<Lorg/apache/http/NameValuePair;>;"
    :goto_2
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    iget-object v7, v7, Lcom/netease/newsreader/activity/FeedBackActivity;->reflashormoreDataHandler:Landroid/os/Handler;

    invoke-virtual {v7, v3}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z

    .line 260
    return-void

    .line 232
    .end local v6           #title:Ljava/lang/String;
    :cond_2
    iget-object v7, p0, Lcom/netease/newsreader/activity/FeedBackActivity$postEditMessage;->this$0:Lcom/netease/newsreader/activity/FeedBackActivity;

    invoke-static {v7}, Lcom/netease/newsreader/activity/FeedBackActivity;->access$6(Lcom/netease/newsreader/activity/FeedBackActivity;)Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/String;->length()I

    move-result v7

    goto/16 :goto_0

    .line 233
    .restart local v6       #title:Ljava/lang/String;
    :cond_3
    invoke-virtual {v6}, Ljava/lang/String;->length()I

    move-result v7

    goto/16 :goto_1

    .line 255
    :catch_0
    move-exception v0

    .line 256
    .local v0, ex:Ljava/lang/Exception;
    iput v13, v3, Landroid/os/Message;->arg1:I

    goto :goto_2
.end method
